﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MEYS.DEMO.BLL;
using MHYS.DEMO.Model;
namespace Demo
{
    public partial class Register : System.Web.UI.Page
    {

        protected  int status = 0;//定义状态码
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnReg_Click(object sender, EventArgs e)
        {
            UserInfo user = new UserInfo()
            {
                Address = this.txtAddress.Text,
                TrueName = this.txtAddress.Text,
                UserName = this.txtUserName.Text,
                UserPwd = this.txtPwd.Text,
                Rid = 3
            };
            if (UserInfoManager.RegisterUser(user))
            {
                this.Response.Write("<script>alert('注册成功')</script>");
                status++;
            }
            else
            {
                this.Response.Write("<script>alert('注册失败')<script>");
            }
        }


    }
}